Image processing apparatus and method

ABSTRACT

According to one embodiment, an image processing apparatus includes first and second computation portions, a selection portion, a projection portion, and a weighted averaging portion. The first computation portion is configured to obtain magnitudes of correlations between a first vector and plural basis vectors. The selection portion is configured to select basis vectors from the plural basis vectors. The projection portion is configured to select a second region, obtain a first projection vector by projecting the first vector onto a subspace formed by the selected basis vectors and obtain a second projection vector for each second region by projecting a second vector onto the subspace. The second computation portion is configured to compute a distance between the first and second projection vectors. The weighted averaging portion is configured to weighted average a pixel value of the second pixel to obtain an output pixel value of a first pixel.

CROSS-REFERENCE TO RELATED APPLICATIONS)

This is a Continuation-In-Part application of PCT Application No.PCT/JP2010/000126, filed on Jan. 13, 2010, which was published under PCTArticle 21(2) in Japanese, the entire contents of which are incorporatedherein by reference.

BACKGROUND Technical Field

Embodiments relate generally to an image processing apparatus and animage processing method for reducing noise in an image.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an exemplary diagram showing the configuration of an imageprocessing apparatus according to a first embodiment;

FIGS. 2A to 2C are exemplary views showing an example of basis vectors;

FIG. 3 is an exemplary flow chart showing an operation of the firstembodiment;

FIGS. 4A to 4E are exemplary views for explaining an operation of aninner product calculation portion;

FIGS. 5A to 5C are exemplary views for explaining an operation of aprojection portion;

FIG. 6 is an exemplary diagram showing the configuration of an imageprocessing apparatus according to a second embodiment; and

FIG. 7 is an exemplary flow chart showing an operation of the secondembodiment.

DETAILED DESCRIPTION

Various embodiments will be described below in detail with reference tothe accompanying drawings. Common reference signs are given toconfigurations and processes for performing the same operations, andduplicated description will be omitted.

According to one embodiment, an image processing apparatus includes afirst computation portion, a selection portion, a projection portion, asecond computation portion and a weighted averaging portion. The firstcomputation portion is configured to obtain magnitudes of correlationsbetween a first vector having, as elements, pixel values of pixels in afirst region containing a first pixel in an image and a plurality ofbasis vectors. The selection portion is configured to select basisvectors from the plurality of basis vectors in accordance with themagnitudes of the correlations. The projection portion is configured toselect second regions containing second pixels in the image, to obtain afirst projection vector by projecting the first vector onto a subspaceformed by the selected basis vectors and to obtain a second projectionvector for each second region by projecting onto the subspace a secondvector in which pixel values of pixels in each second region arearranged. The second computation portion is configured to compute, foreach second region, a distance between the first projection vector andthe second projection vector corresponding to each second region. Theweighted averaging portion is configured to weighted average a pixelvalue of the second pixel with giving a larger weight to the secondpixel as the distance corresponding to each second region is smaller soas to obtain an output pixel value of the first pixel.

First Embodiment

FIG. 1 is an exemplary block diagram showing an image processingapparatus 100 according to a first embodiment.

The image processing apparatus 100 includes an inner product calculationportion 101, a selection portion 102, a projection portion 103, adistance calculation portion 104, and a weighted averaging portion 105.

The inner product calculation portion 101 calculates inner products of afirst vector and a plurality of (e.g. M) basis vectors. The first vectorhas pixel values, which are arranged as its elements, of pixels in afirst region containing a pixel to be processed (hereinafter referred toas first pixel) in an input image. The plurality of basis vectors arestored in the inner product calculation portion 101 in advance. Aplurality of contribution degrees indicating magnitudes of correlationsbetween the first vector and the basis vectors, respectively, arecomputed by squaring the computed inner products. Although thisembodiment shows an example in which inner products are used to evaluatethe magnitudes of correlations between the first vector and the basisvectors, the method is not limited to inner products. Any other methodmay be used so long as the method can evaluate the magnitudes ofcorrelations between vectors. A larger value of a square of innerproduct indicates higher correlation between two vectors.

FIGS. 2A to 2C are exemplary views showing an example of computation ofthe basis vectors stored in advance. With regard to partial images 302extracted from one or more images 301 in advance, a principal componentanalysis is performed on vectors in which pixel values of pixelscontained in the respective partial images are arranged. Principalcomponent vectors 303 thus obtained are used as a basis vector group.Each image 301 may be an input image or may be another image forlearning. When the principal component analysis is used successively,the inner product computation portion 101 computes the basis vectors.

Other than the aforementioned method, (1) eigenvectors obtained byperforming a canonical correlation analysis or an independent componentanalysis on images extracted from one or more images in advance, (2)bases of a two-dimensional discrete Fourier transform, (3) bases of atwo-dimensional discrete wavelet transform, or the like, may be used asa basis vector group.

The selection portion 102 selects a plurality of (e.g. L, L≦M) basisvectors to be sent to the projection portion 103, from the plurality ofbasis vectors in accordance with the values of the inner productscomputed by the inner product computation portion 101. The selectionmethod will be described later in detail.

The projection portion 103 computes a first projection vector byprojecting the first vector onto a subspace formed by the basis vectorsselected by the selection portion 102. The projection portion 103further computes a second projection vector by projecting a secondvector onto the subspace formed by the basis vectors selected by theselection portion 102. The second vector has pixel values, which arearranged as its elements, of pixels in a second region containing asecond pixel (a pixel different from the first pixel) which is not aprocessing target and is in the input image. One or more second regionsare selected successively in a search range.

The distance computation portion 104 computes an inter-vector distancebetween the first projection vector and the second projection vector,for each second region.

The weighted averaging portion 105 gives a large weight to a pixel valueof each second pixel corresponding to the second projection vectorhaving a relatively short inter-vector distance computed by the distancecomputation portion 104. Respective weights for the second pixelsselected by the projection portion 103 are computed. A pixel valuecomputed by weighted-averaging a sum of the second pixel valuesmultiplied by the weights is set as an output pixel value of the firstpixel. An output image in which the pixel value of the first pixel isreplaced with the output pixel value computed by the weighted averagingportion 105 is output.

Next, an operation of the image processing apparatus 100 will bedescribed below.

FIG. 3 is an exemplary flow chart showing the operation of the imageprocessing apparatus 100. Description will be made with reference toFIGS. 4A to 4E which show an operation of the inner product computationportion 101. FIG. 4A is a view showing a region 401 containing a firstpixel i. FIG. 4B is a view showing a first vector 402 corresponding tothe region 401. FIG. 4C is a view showing a basis vector group 403 andrespective basis vectors 4031 obtained by excluding a vector having thelargest absolute value of a sum of elements (a first principal componentvector in the example of FIG. 4C) from basis vectors obtained inadvance. FIG. 4D is a view showing an example of contribution degrees404 computed by the inner product calculation portion 101. FIG. 4E is aview showing an example of the contribution degrees 404 which arerearranged in descending order.

The inner product computation portion 101 computes squares of the innerproducts of the first vector 402 in which pixel values of pixels in theregion 401 containing the first pixel i are arranged and the respectivebasis vectors 4031 of the basis vector group 403 (S201). The computedsquares of the inner products indicate contribution degrees 404 of therespective basis vectors to the region 401 containing the first pixel i.

The first vector is expressed as v_(i), and the k-th element of v_(i) isexpressed as (v_(i))_(k). Assuming that the vector having the largestabsolute value of the sum of elements is the first principal componentvector, then the contribution degree p_(n) of the n-th basis vector inN−1 basis vectors {a_(n)|2≦n≦N} obtained by excluding the firstprincipal component vector from the prepared N basis vectors is computedby the expression 1.

$\begin{matrix}{p_{n} = \left\lbrack {\sum\limits_{k}\; \left\{ {\left( v_{i} \right)_{k}\left( a_{n} \right)_{k}} \right\}} \right\rbrack^{2}} & \left( {{Expression}\mspace{14mu} 1} \right)\end{matrix}$

An example of the computed contribution degrees 404 of the respectivebasis vectors is shown in FIG. 4E.

Then, the selection portion 102 rearranges the contribution degrees 404computed by the inner product computation portion 101 in descendingorder and adds up the contribution degrees from the head until a sum ofthe contribution degrees 404 reaches a threshold value indicating apredetermined ratio. The selection portion 102 selects respective basisvectors corresponding to the contribution degrees which have been addedso far when the sum of the contribution degrees 404 reaches thethreshold value (S202). For example, in the case where the threshold is0.7, the threshold P_(T) is computed as follows.

$\begin{matrix}{P_{T} = {0.7{\sum\limits_{n = 2}^{N}\; p_{n}}}} & \left( {{Expression}\mspace{14mu} 2} \right) \\{P_{T} \geq {\sum\limits_{n = 2}^{d}\; p_{n}}} & \left( {{Expression}\mspace{14mu} 3} \right)\end{matrix}$

When the maximum d satisfying the expression 3 is obtained, theselection portion 102 selects d−1 basis vectors {a_(n)|2≦n≦d}.

It is considered that the inner product of the vector in which pixelvalues of pixels in a region in an image are arranged and each basisvector reflects a magnitude of a correlation to an image of the region.There is a high possibility that a basis vector having a small innerproduct is affected by noise. It is therefore considered that when abasis vector having a large inner product is selected for computation ofan inter-vector distance in a subsequent stage, the inter-vectordistance reflecting a characteristic of a signal in the region can becomputed so that the influence of noise on the computation of theinter-vector distance can be reduced.

However, when the contribution degree is computed by use of all basisvectors (inclusive of the first principal component) in the basis vectorgroup, that is, in accordance with the expression 4, an average pixelvalue in the region gives a large influence on selecting the basisvectors based on the contribution degree.

$\begin{matrix}{P_{T} = {0.7{\sum\limits_{n = 1}^{N}\; p_{n}}}} & \left( {{Expression}\mspace{14mu} 4} \right)\end{matrix}$

For example, since a contribution degree of a vector having a largeabsolute value of a sum of elements in a bright region is relativelyhigh compared with that in a dark region, the vector having the largeabsolute value of the sum of elements is selected easily. An innerproduct of the vector having the large absolute value of the sum ofelements has a high correlation to the average pixel value in theregion. This means that a texture portion and a flat portion are notdistinguished in a bright region if those portions are equal in averageof brightness, which causes unevenness in a bright flat portion andblurring in a bright texture portion in the bright region. To deal withthis matter, the configuration is made so that the contribution degreeis computed by use of the basis vectors obtained excluding the vectorhaving the largest absolute value of the sum of elements from the basisvector group. Thereby, in a bright region, a basis vector an absolutevalue of a sum of elements of which is small and which well represents astate of signal change is selected. Accordingly, even in the brightregion, unevenness in the flat portion and blurring in the textureportion less occur.

FIGS. 5A to 5C are exemplary views showing an operation of theprojection portion 103. FIG. 5A is an exemplary view showing examples ofa first pixel i, second pixels j, and second pixel-containing regions4011 to 4013. FIG. 5B is an exemplary view showing a second vector 4021corresponding to the region containing the second pixel. FIG. 5C is anexemplary view showing an example of a subspace A generated by theprojection portion 103.

The projection portion 103 forms a subspace A by the d−1 basis vectorsselected from the basis vector group at S202 and the basis vector havingthe largest absolute value of the sum of elements (the first principalcomponent in the example of FIG. 5) and projects the first vector ontothe subspace A to obtain a first projection vector. The projectionportion 103 further projects a second vector 4021, in which pixel valuesof pixels in each of the second pixel-containing regions 4011 to 4013 inthe input image are arranged, onto the subspace A to obtain a secondprojection vector (S203). When the d−1 basis vectors are selected atS202, the first projection vector v′_(i) obtained by projecting thefirst vector v_(i) onto the d-dimensional subspace A is expressed asfollows.

$\begin{matrix}{v_{i}^{\prime} = {\sum\limits_{n = 1}^{d}\; {f_{i,n}a_{n}}}} & \left( {{Expression}\mspace{14mu} 5} \right)\end{matrix}$

where f_(i,n) denotes the inner product of the first vector v_(i) andthe n-th basis vector a_(n). Similarly, the second projection vectorv′_(j) obtained by projecting the second vector v_(j) onto the subspaceA is expressed as follows.

$\begin{matrix}{v_{j}^{\prime} = {\sum\limits_{n = 1}^{d}\; {f_{j,n}a_{n}}}} & \left( {{Expression}\mspace{14mu} 6} \right)\end{matrix}$

The distance computation portion 104 computes an inter-vector distanceon the subspace A between the first projection vector and the secondprojection vector (S204). Assuming that the first and second projectionvectors obtained at S203 are v′; and v′_(j) respectively, then theinter-vector distance D(i,j) between v′_(i) and v′_(j) is calculated asfollows.

$\begin{matrix}{{D\left( {,j} \right)} = {\sum\limits_{n = 1}^{d}\; \left\{ {\left( v_{i}^{\prime} \right)_{n} - \left( v_{j}^{\prime} \right)_{n}} \right\}^{2}}} & \left( {{Expression}\mspace{14mu} 7} \right)\end{matrix}$

The distance computation portion 104 determines as to whether or not allsecond projection vectors for the second pixels in a predeterminedsearch range have been already computed (S205). The search range for thesecond pixels may be any of various ranges, such as all pixels in animage containing the first pixel, pixels in a range near a second pixel,pixels in an image containing no first pixel, etc. For example, in thecase of an input image acquired by a sensor, it is effective that pixelson the same line are selected as second pixels. If the second projectionvectors for all the second pixels in the search range have been computed(Yes at S205), the weighted averaging portion 105 performs such aweighted averaging process that a larger weight is given to a pixelvalue of each second pixel as the computed inter-vector distance isshorter, and replaces the pixel value of the first pixel with theweighted average of the pixel values of the second pixels (S206). Anoutput pixel value x_(i)̂ of the first pixel (“a character Psuperscribed with a hat sign ̂” in expressions will be noted as “P̂” inthis description) is, for example, computed as follows with use of thepixel value x_(j) of the second pixel.

$\begin{matrix}{{{\hat{x}}_{i} = {\frac{1}{Z()}{\sum\limits_{j \in {\Omega {(i)}}}\; {{\exp \left( {- \frac{D\left( {,j} \right)}{h}} \right)}x_{j}}}}}{{Z()} = {\sum\limits_{j \in {\Omega {(i)}}}\; {\exp \left( {- \frac{D\left( {,j} \right)}{h}} \right)}}}} & \left( {{Expression}\mspace{14mu} 8} \right)\end{matrix}$

where Ω(i) denotes a range for searching for the second pixels, and hdenotes a parameter larger than 0.

As described above, according to the image processing apparatus of thisembodiment, the distance in the space reflecting the characteristic ofthe peripheral region of the pixel to be processed is computed so thatthe inter-vector distance between two regions different incharacteristic can be prevented from being shortened. Therefore, theweights of pixels in regions different in characteristic can beprevented from becoming large at weighted averaging. Accordingly, noisecan be reduced while sharpness can be kept in the texture portionwhereas noise can be reduced without occurrence of unevenness in theflat portion.

Second Embodiment

An image processing apparatus 600 according to a second embodiment isdifferent from the image processing apparatus 100 according to the firstembodiment in that the image processing apparatus 600 is provided with anoise computation portion 601 which computes an amount of noise. Anoperation of a selection portion 602 varies according to the amount ofnoise computed by the noise computation portion 601.

FIG. 6 is an exemplary diagram showing the image processing apparatus600.

The noise amount computation portion 601 computes an amount of noisesuperposed on a first pixel in an input image.

The selection portion 602 computes inner products of a first vector inwhich pixel values of pixels in a first region containing the firstpixel are arranged and a plurality of basis vectors, and selects basisvectors having large inner products so that the number of selected basisvectors decreases as the computed amount of noise increases.

FIG. 7 is an exemplary flow chart showing an operation of the imageprocessing apparatus 600. This embodiment will be described about anexample in which the principal component analysis is performed onpartial images extracted from one or more images in advance so thatprincipal component vectors thus obtained are used as a basis vectorgroup.

The noise amount computation portion 601 estimates an amount of noisesuperposed on a first region containing a first pixel which is aprocessing target in an input image (S701). For example, the amount ofnoise can be computed as a value obtained by multiplying the square rootof the average of pixel values in the first region by a parameter notsmaller than 0. Alternatively, the standard deviation of the pixelvalues in the first region may be used as the amount of noise.Incidentally, besides the amount of noise computed by the estimationfrom the input image, for example, ISO sensitivity may be used as theamount of noise when the image processing apparatus is incorporated intoa digital camera or the like. For example, a value having a negativecorrelation to an irradiated X-ray dose may be used as the amount ofnoise when the image processing apparatus is incorporated into an X-raytransmission apparatus or the like. In addition, when the amount ofnoise generated in each of these image capturing apparatuses is known,that value can be used.

The selection portion 602 rearranges the contribution degrees computedat S201 in descending order, sets a value of a predetermined percentageof a sum of the contribution degrees as a threshold value, and adds thecontribution degrees from the head until the sum of the addedcontribution degrees reaches the threshold value. Computation isperformed except the vector having the largest absolute value of the sumof elements in the same manner as in S202. On this occasion, thethreshold value is determined so that the threshold value decreases asthe amount of noise calculated in S701 increases. When the sum of theadded contribution degrees reaches the threshold value, the selectionportion 602 selects respective basis vectors corresponding to thecontribution degrees which have been added so far (S703).

According to the image processing apparatus in the second embodiment,when the amount of noise superposed on the image is small, the number ofbasis vectors to be selected is increased automatically so that signalchange in the input image remains faithfully. Thus, signals in thetexture portion can be prevented from being added to the flat portion.Therefore, unevenness in the flat portion can be reduced further morethan that in the first embodiment. When the amount of noise is large,the number of basis vectors to be selected is reduced automatically sothat a subspace can be formed by only basis vectors particularlyreflecting the state of signal change. Therefore, the influence of noiseon computation of the inter-vector distances is reduced effectively sothat noise can be removed while sharpness of the texture can be kept ascompared with the case where the number of basis vectors is large.

Modification 1

In the first and second embodiments, the basis vector group may beformed of principal component vectors except vectors having eigenvaluessmaller than a predetermined threshold value, the eigenvalues beingobtained by the principal component analysis and corresponding to theprincipal component vectors.

Modification 2

In the first and second embodiments, the contribution degrees of basisvectors in a basis vector group except a vector having the largestabsolute value of the sum of elements may be added in order ofeigenvalue obtained by the principal component analysis withoutrearrangement of the contribution degrees in the inner productcomputation portion, and when the sum of the added contribution degreesreaches the threshold value, respective basis vectors corresponding tothe contribution degrees which have been added so far may be selected.

Modification 3

In the first and second embodiments, the inner product computationportion may be designed so as to compute the contribution degrees ofbasis vectors each having a smaller absolute value of the sum ofelements than a predetermined threshold value in a basis vector group.In addition, the contribution degree of each basis vector may becomputed after the average pixel value in the first region issubtracted.

Modification 4

In the first and second embodiments, the absolute values of the innerproducts of a first vector in which pixel values of pixels located in aperipheral region containing a first pixel are arranged and basisvectors may be used as contribution degrees of the basis vectors. Inthis case, the expression 9 is used as a contribution degree in place ofthe expression 1.

$\begin{matrix}{p_{n}^{\prime} = {\sum\limits_{k}\; {{\left( v_{i} \right)_{k}\left( a_{n} \right)_{k}}}}} & \left( {{Expression}\mspace{14mu} 9} \right)\end{matrix}$

where |•| is a sign indicating an absolute value.

Modification 5

In the first and second embodiments, the expression. 10 may be used asthe inter-vector distance between the first projection vector and thesecond projection vector in place of the expression 4.

$\begin{matrix}{{D\left( {,j} \right)} = {\sum\limits_{n = 1}^{d}\; {{\left( v_{i}^{\prime} \right)_{n} - \left( v_{j}^{\prime} \right)_{n}}}}} & \left( {{Expression}\mspace{14mu} 10} \right)\end{matrix}$

Incidentally, the invention is not limited to the aforementionedembodiments per se but constituent members can be modified to embody theinvention without departing from the gist of the invention in apractical stage. A plurality of constituent members disclosed in theaforementioned embodiments may be combined suitably to form variousinventions. For example, some constituent members may be removed fromall constituent members shown in one of the embodiments. In addition,constituent members disclosed in different embodiments may be combinedsuitably.

Incidentally, this image processing apparatus can be implemented, forexample, by a general-purpose computer apparatus used as basic hardware.That is, the inner product calculation portion, the projection portion,the distance calculation portion and the weighted averaging portion canbe implemented by a program executed in a processor mounted in theaforementioned computer apparatus. On this occasion, the imageprocessing apparatus may be implemented by the aforementioned programwhich is installed in the computer apparatus in advance or may beimplemented by the aforementioned program which is stored in a storagemedium such as a CD-ROM or distributed through a network so as to beinstalled in the computer apparatus appropriately.

1. An image processing apparatus comprising: a first computation portionconfigured to obtain magnitudes of correlations between a first vectorhaving, as elements, pixel values of pixels in a first region containinga first pixel in an image and a plurality of basis vectors; a selectionportion configured to select basis vectors from the plurality of basisvectors in accordance with the magnitudes of the correlations; aprojection portion configured to select second regions containing secondpixels in the image, to obtain a first projection vector by projectingthe first vector onto a subspace formed by the selected basis vectorsand to obtain a second projection vector for each second region byprojecting onto the subspace a second vector in which pixel values ofpixels in each second region are arranged; a second computation portionconfigured to compute, for each second region, a distance between thefirst projection vector and the second projection vector correspondingto each second region; and a weighted averaging portion configured toweighted average a pixel value of the second pixel with giving largerweights to the second pixel as the distance corresponding to each secondregion is smaller so as to obtain an output pixel value of the firstpixel.
 2. The image processing apparatus according to claim 1, whereinthe projection portion selects a plurality of second regions eachcontaining the second pixel.
 3. The image processing apparatus accordingto claim 1, wherein the first computation portion computes themagnitudes of the correlations based on inner products of the firstvector and the plurality of basis vectors.
 4. The image processingapparatus according to claim 2, wherein the first computation portioncomputes the magnitudes of the correlations based on squared innerproducts of the first vector and the plurality of basis vectors, and theselection portion adds the magnitudes of the correlations from the basisvector having the largest magnitude of the correlation until a sum ofthe added magnitudes of the correlations reaches a predeterminedthreshold value and selects the basis vectors having the magnitudes ofthe correlations which have been added until the sum of the addedmagnitudes of the correlations reaches the threshold value.
 5. The imageprocessing apparatus according to claim 2, wherein the first computationportion computes the magnitudes of the correlations based on absolutevalues of inner products of the first vector and the plurality of basisvectors, and the selection portion adds the magnitudes of thecorrelations from the basis vector having the largest magnitude of thecorrelation until a sum of the added magnitudes of the correlationsreaches a predetermined threshold value and selects the basis vectorshaving the magnitudes of the correlations which have been added untilthe sum of the added magnitudes of the correlations reaches thethreshold value.
 6. The image processing apparatus according to claim 2,wherein the selection portion selects the basis vectors in accordancewith the magnitudes of the correlations from the plurality of basisvectors except basis vectors in each of which an absolute value of a sumof elements is larger than a predetermined criterion, and the projectionportion forms the subspace by the basis vectors in each of which theabsolute value of the sum of the elements is larger than thepredetermined criterion, and the selected basis vectors.
 7. The imageprocessing apparatus according to claim 1, further comprising: a noiseamount computation portion that computes an amount of noise in the firstregion containing the first pixel, wherein the selection portion selectsthe basis vectors so that a number of the selected basis vectors issmaller as the amount of noise is larger.
 8. The image processingapparatus according to claim 2, wherein the first computation portioncomputes the basis vectors by performing a principal component analysison a plurality of blocks which are extracted from at least one image inadvance.
 9. The image processing apparatus according to claim 2, whereinthe first computation portion uses base of a two-dimensional discretewavelet transform as the basis vectors.
 10. The image processingapparatus according to claim 2, wherein the first computation portioncomputes the basis vectors by performing an independent componentanalysis on a plurality of blocks which are extracted from at least oneimage in advance.
 11. An image processing method comprising: obtainingmagnitudes of correlations between a first vector having, as elements,pixel values of pixels in a first region containing a first pixel in animage and a plurality of basis vectors; selecting basis vectors from theplurality of basis vectors in accordance with the magnitudes of thecorrelations; selecting second regions containing second pixels in theimage; obtaining a first projection vector by projecting the firstvector onto a subspace formed by the selected basis vectors; obtaining asecond projection vector for each second region by projecting onto thesubspace a second vector in which pixel values of pixels in each secondregion are arranged; computing, for each second region, a distancebetween the first projection vector and the second projection vectorcorresponding to each second region; and weighted averaging a pixelvalue of the second pixel with giving a larger weight to the secondpixel as the distance corresponding to each second region is smaller soas to obtain an output pixel value of the first pixel.
 12. The imageprocessing method according to claim 11, wherein the selecting of thesecond regions selects a plurality of second regions each containing thesecond pixel.
 13. The image processing method according to claim 11,wherein the obtaining of the magnitudes of the correlations includescomputing the magnitudes of the correlations based on inner products ofthe first vector and the plurality of basis vectors.
 14. The imageprocessing method according to claim 12, wherein the obtaining of themagnitudes of the correlations includes the magnitudes of thecorrelations based on squared inner products of the first vector and theplurality of basis vectors, and the selecting of the basis vectorsincludes adding the magnitudes of the correlations from the basis vectorhaving the largest magnitude of the correlation until a sum of the addedmagnitudes of the correlations reaches a predetermined threshold value,and selecting the basis vectors having the magnitudes of thecorrelations which have been added until the sum of the added magnitudesof the correlations reaches the threshold value.
 15. The imageprocessing method according to claim 12, wherein the obtaining of themagnitudes of correlations includes computing the magnitudes of thecorrelations based on absolute values of inner products of the firstvector and the plurality of basis vectors, and the selecting of thebasis vectors includes adding the magnitudes of the correlations fromthe basis vector having the largest magnitude of the correlation until asum of the added magnitudes of the correlations reaches a predeterminedthreshold value, and selecting the basis vectors having the magnitudesof the correlations which have been added until the sum of the addedmagnitudes of the correlations reaches the threshold value.
 16. Theimage processing method according to claim 12, wherein the selecting ofthe basis vector includes selecting the basis vectors in accordance withthe magnitudes of the correlations from the plurality of basis vectorsexcept basis vectors in each of which an absolute value of a sum ofelements is larger than a predetermined criterion, and the obtaining ofthe first projection vector includes forming the subspace by the basisvectors in each of which the absolute value of the sum of the elementsis larger than the predetermined criterion, and the selected basisvectors.
 17. The image processing method according to claim 11, furthercomprising: computing an amount of noise in the first region containingthe first pixel, wherein the selecting of the basis vector includesselecting the basis vectors so that a number of the selected basisvectors is smaller as the amount of noise is larger.
 18. The imageprocessing method according to claim 12, wherein the obtaining of themagnitudes of the correlations includes computing the basis vectors byperforming a principal component analysis on a plurality of blocks whichare extracted from at least one image in advance.
 19. The imageprocessing method according to claim 12, wherein the obtaining of themagnitudes of the correlations includes using base of a two-dimensionaldiscrete wavelet transform as the basis vectors.
 20. The imageprocessing apparatus according to claim 12, wherein the obtaining of themagnitudes of the correlations includes computing the basis vectors byperforming an independent component analysis on a plurality of blockswhich are extracted from at least one image in advance.